<?php

namespace Core\Common\Base;

use DCarbone\PHPConsulAPI\Config;

/**
 * @Author: feidao@ibantang.com, 2020, all rights reserved
 * @Date: 2020/3/12
 * @Time: 8:44 PM
 * @Brief:
 */
class ConsulConfig extends Config
{
    /**
     * @return array
     */
    public function getGuzzleRequestOptions(): array
    {
        $opts = parent::getGuzzleRequestOptions();
        $opts["read_timeout"] = 5;
        $opts["timeout"] = 5;
        $opts["connect_timeout"] = 3;
        // 添加超时时间
        return $opts;
    }
}
